<?php

class Core_Model_DbTable_Terms extends Zend_Db_Table_Abstract{
	
	protected $_name =  'core_terms';
	
	protected $_rowClass =  'Core_Model_Term';
	
	/**
	 * @param   string   $term
	 * @param   string   $site_id
	 * @return  Core_Model_Term
	 */
	public function getTerm($term, $site_id = NULL){
		if($site_id == NULL){
			$site_id  = Agilet::getInst()->getSiteId();
		}
		$select=  $this->select()->where('term=?', $term)->where('site_id=?',$site_id);
		return $this->fetchRow($select);
	}
	
}
